home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 4 / Precision Software Applications Silver Collection Volume 4 (1993).iso / database / at_last.exe / AL.DOC < prev    next >
Text File  |  1991-05-06  |  70KB  |  1,639 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                                     CONTENTS
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.              Conditions of Use
  17.  
  18.  
  19.              Registration Form
  20.  
  21.  
  22.           1. Getting Started
  23.  
  24.  
  25.           2. Definition Tutorial
  26.  
  27.  
  28.           3. Access Tutorial
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.          PC AtLast - Copyright Mike York, Rational Solutions 1987/88/89
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                                 CONDITIONS OF USE
  45.  
  46. The program on this disk, PC AtLast, is distributed as shareware. This means
  47. that you may try it out and copy it to others to try for free. If, however, you
  48. wish to make proper use of it to hold and manipulate a database, you must
  49. register your copy for a small fee with the copyright holder.
  50.  
  51. The program on this disk is a complete working version of the program. The
  52. tutorial manual that follows, however, only contains sufficient information for
  53. you to make use of all the main features of the program that are necessary to
  54. try out the example databases or similar.
  55.  
  56. The program is the PC version of a very successful and popular database program
  57. sold for Amstrad PCW and CPC6128 computers. It is a fully menu-driven, user-
  58. definable database manager which combines speed with flexibility and ease of
  59. use. Minimum requirements are an IBM PC or compatible with 256K RAM and a single
  60. floppy disk drive. It is particularly convenient on a single floppy portable
  61. even when there are several memory-resident programs.
  62.  
  63.  
  64.                                   REGISTRATION
  65.  
  66. If, having tried the program, you wish to use it in earnest, you must register
  67. your copy. Registration costs £19.95 inclusive of VAT and entitles you to the
  68. following
  69.  
  70. 1. The latest version of the program and inclusion in our database for
  71. notification of updates that later become available.
  72.  
  73. 2. The complete printed reference manual.
  74.  
  75. For an optional additional sum of £10 inclusive of VAT you will receive
  76. telephone support for one year from the date of registration.
  77.  
  78. Each registration entitles you to make use of one copy only of the program on a
  79. single computer. Should you wish to register several copies, you must pay for
  80. each one. However, should you wish to have a site licence for more than 5
  81. copies, please contact us at the address below and we will arrange a special
  82. rate.
  83.  
  84. You may pay  in £ (pounds) sterling by
  85.  
  86. 1. A cheque or bankers draft drawn on a UK account
  87.  
  88. 2. ACCESS (MasterCard) or VISA credit cards
  89.  
  90. An order form is provided on the next page. Please note that payment includes
  91. post and packing and VAT where applicable. The price is the same to overseas
  92. customers even if VAT is not payable.
  93.  
  94. If you do not wish to use the program but would like to be on our mailing list
  95. for further or future information, simply fill in the registration form,
  96. indicating 'No' to both options and enclosing no payment.
  97.  
  98.  
  99.  
  100.  
  101.                                      - 2 -
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.                                 REGISTRATION FORM
  109.  
  110.  
  111. Name : ......................................................................
  112.  
  113. Organisation: ...............................................................
  114.  
  115. Address: ....................................................................
  116.  
  117.          ....................................................................
  118.  
  119.          ....................................................................
  120.  
  121.          ....................................................................
  122.  
  123. Registration & manual    £19.95    Yes/No
  124.  
  125. 1 year 'phone support    £10.00    Yes/No
  126.  
  127. ........ copies @       ........ each
  128.  
  129. Amount due: ................
  130.  
  131. Method of payment (please ring):
  132.  
  133. Cheque/Draft   ACCESS/Mastercard   Barclaycard/VISA
  134.  
  135. (Cheques should be made payable to M York.)
  136.  
  137. Card No. .....................................................
  138.  
  139. Expiry date ............
  140.  
  141. Send this form together with payment to:
  142.  
  143.                Software Registration,
  144.                Carn House,
  145.                Canworthy Water,
  146.                Launceston,
  147.                Cornwall,
  148.                PL15 8UB
  149.                ENGLAND
  150.  
  151.        If you have any queries about registration, please ring 056681-511.
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.                                      - 3 -
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.                                1. GETTING STARTED
  173.  
  174. 1.1 Contents of the PC AtLast Master disk
  175.  
  176. The PC AtLast program is supplied on one disk and contains all the required
  177. program files and some example database definition files for you to examine.
  178.  
  179. The files on the disk include:-
  180.  
  181.      AL.COM         The main program file that integrates all other files.
  182.  
  183.      DBDEF.CHN      The main Database Definition program and overlay files.
  184.      DBDEF.000
  185.      DBDEF.001
  186.  
  187.      DBUSE.CHN      The main Database Access program and overlay files.
  188.      DBUSE.000
  189.         to
  190.      DBUSE.005
  191.  
  192.      ????????.DEF   Example definition files.
  193.      ????????.FRM
  194.      ????????.FIX
  195.  
  196.      INSTALL.BAT    Batch file used during Installation of PC AtLast.
  197.      FLOPPY.HLD     Used during Floppy disk installation.
  198.      HARD.HLD       Used during Hard disk installation.
  199.  
  200.      READ.ME        A text file giving details of any enhancements/changes to PC
  201.                     AtLast, together with details of the use of any example
  202.                     files.
  203.  
  204.      AL.DOC         This tutorial manual
  205.  
  206. Note: '????????' in the above files means that they may have any name. Each
  207. Example Database will have one of each file 'type' with the same filename.
  208.  
  209. Details of the various examples will be found on the READ.ME file on the Master
  210. program disk. Load the READ.ME file into a word processor, to examine it or
  211. use:-
  212.  
  213.           TYPE A:READ.ME      and press <RETURN>
  214.  
  215. Pressing CTRL-S during listing will pause the listing and a further press will
  216. continue it. To print it on your printer use
  217.  
  218.           PRINT A:READ.ME     and press <RETURN>
  219.  
  220. 1.2 Making your Working Copy of PC AtLast
  221.  
  222. PC AtLast may be used with single or twin floppy drive computers, or with a hard
  223. disk. Reset the computer by switching off and then switching on again and
  224. loading DOS in the usual way.
  225.  
  226.  
  227.  
  228.  
  229.                                      - 4 -
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236. Make sure that the PC AtLast Master disk is 'write-protected' by sticking an
  237. adhesive label over the notch (3.5" disk users should slide the tab across).
  238.  
  239. 1.2.1 Hard disk installation
  240.  
  241. Installation is very simple. Make sure that the selected drive is the hard disk
  242. (usually drive C:) and then enter:-
  243.  
  244.           A:INSTALL H         and press <RETURN>
  245.  
  246. Installation will be onto drive C: and in the process a sub-directory, called
  247. ATLAST, will be created. In addition, a batch file will be created on the root
  248. directory, called ATLAST.BAT.
  249.  
  250. If your hard disk is not drive C:, then you should change all references to 'C:'
  251. in the INSTALL.BAT file, using a text editor, before attempting installation.
  252.  
  253. 1.2.2 Floppy disk installation
  254.  
  255. PC AtLast may be used with both single and twin floppy drive computers. It is
  256. obviously more convenient to use a twin drive computer, as you can keep the
  257. program files on one disk and store all data on a disk in the other drive.
  258.  
  259. 1.2.2.1 Twin floppy
  260.  
  261. Before carrying out installation, format a new disk, using the DOS FORMAT
  262. command with the '/S' parameter, to make sure that the DOS system files are
  263. copied onto the disk in the process, as follows.
  264.  
  265. With the DOS system disk in drive A:, type:-
  266.  
  267.           FORMAT A: /S        and press <RETURN>
  268.  
  269. When the disk has been formatted, you should return to the DOS prompt.
  270.  
  271. Insert the supplied PC AtLast Master disk into drive A: and the newly formatted
  272. disk into drive B: and enter:-
  273.  
  274.           A:INSTALL 2         and press <RETURN>
  275.  
  276. The required program files will be copied from the PC AtLast Master disk to the
  277. new working disk. In the process, an 'AUTOEXEC.BAT' file will also be created on
  278. the disk.
  279.  
  280. 1.2.2.2 Single floppy
  281.  
  282. A working copy of the supplied PC AtLast Master disk should be made, using the
  283. DISKCOPY command. Insert the DOS System disk into the drive and enter:-
  284.  
  285.           DISKCOPY       and press <RETURN>
  286.  
  287. You will be prompted to insert the 'source' and 'target' disks. When prompted
  288. for 'Source', insert the PC AtLast Master disk and, when prompted for 'Target',
  289.  
  290.  
  291.  
  292.  
  293.                                      - 5 -
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300. the new disk that you want to copy the program onto. Once the disk has been
  301. copied, the new disk should be inserted into the drive and you should enter:-
  302.  
  303.           A:INSTALL 1         and press <RETURN>
  304.  
  305.  
  306. This installation procedure will remove all unnecessary files from the disk, to
  307. make more room for data files.
  308.  
  309. 1.2.3 All Models
  310.  
  311. Make sure that the CONFIG.SYS file on your DOS boot disc contains a command:
  312.  
  313. FILES = N
  314.  
  315. where N is a number between 12 and 20. If it does not, then edit it accordingly.
  316. (Amstrad owners use RPED.)
  317.  
  318. Twin disk users should note that default CONFIG.SYS and AUTOEXEC.BAT files have
  319. been set up onto the working disk during installation. They can be replaced with
  320. your own favoured versions as desired as long the FILES parameter in CONFIG.SYS
  321. is at least 12.
  322.  
  323. You should now put the PC AtLast Master disk away in a safe place.
  324.  
  325. Note: You should never use the Master disk, other than to create a working copy.
  326. If you do and you damage it, you will not be able to create a further working
  327. copy.
  328.  
  329. Before going any further, it is recommended that you now make a back up copy of
  330. the new working version of PC AtLast, using DISKCOPY so that you do not have to
  331. go through the installation procedure again, in the event of a disaster.
  332.  
  333. 1.3 Example files
  334.  
  335. When installing PC AtLast onto a hard disk, you have the option to copy the
  336. example files onto the hard disk as well.
  337.  
  338. When installed on a floppy disk, the Example files are not copied onto the disk
  339. and it is recommended that you copy them on to your data disk when you want to
  340. use them.
  341.  
  342. 1.4 Loading and Using PC AtLast
  343.  
  344. 1.4.1 Hard disk use
  345.  
  346. If you are using a hard disk and have installed PC AtLast as described earlier
  347. in this chapter, you should load PC AtLast by typing:-
  348.  
  349.           ATLAST <directory path><filename>       and press <RETURN>.
  350.  
  351. where <filename> is optional and is the name of an existing database and
  352. <directory path> (also optional) is the directory path where the database will
  353. be found. If specified, the database will be loaded as well.
  354.  
  355.  
  356.  
  357.                                      - 6 -
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364. 1.4.2 Twin Floppy disk use
  365.  
  366. If you have installed PC AtLast as described in the first part of this chapter,
  367. you should insert your working copy of the PC AtLast Program disk into drive A:
  368. when you switch on the computer. DOS and PC AtLast will then both be loaded
  369. automatically.
  370.  
  371. If you already have the computer switched on and with DOS loaded, insert your
  372. working disk into drive A: and enter:-
  373.  
  374.           AL
  375.  
  376.  
  377. 1.4.3 Single Floppy disk use
  378.  
  379. When using PC AtLast with a single drive computer, you should load DOS as
  380. normal, then remove the DOS System disk and replace it with your working disk.
  381. Enter:-
  382.  
  383.           AL
  384.  
  385. 1.5 Where to store the database files
  386.  
  387. 1.5.1 Hard disk
  388.  
  389. Data files may be stored in any directory and the directory path should be
  390. specified when requested, or as part of the command line, when loading PC
  391. AtLast, as described earlier in the chapter. By default, PC AtLast will look for
  392. them in the current directory.
  393.  
  394. 1.5.2 Twin Floppy disk
  395.  
  396. The data files would normally be stored on a second disk in drive B:. The
  397. program disk would be left in drive A:, so that no disk changing is required.
  398. When loading a database, you should specify drive B: when requested. It is
  399. possible to store the data files on the same disk as the program, but this is
  400. not recommended, as the amount of space available for data will be un-
  401. necessarily restricted.
  402.  
  403. 1.5.3 Single Floppy disk
  404.  
  405. The data files are stored on the same disk as the program files. The normal
  406. procedure is to define the database and once it has been tested thoroughly and
  407. no further changes are required to the database definition, the program files
  408. that are concerned with the Definition  (DBDEF.*) may be copied onto another
  409. disk and the original files deleted from your working disk, to make more room
  410. available for data. This need only be done when more space for data on the disk
  411. is required.
  412.  
  413. If any changes are subsequently required to the database definition, the data
  414. files may be copied onto the disk containing the definition program files and
  415. the changes made, before copying the modified files back onto your working disk.
  416.  
  417.  
  418.  
  419.  
  420.  
  421.                                      - 7 -
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428. To copy the program definition files onto a spare disk, enter:-
  429.  
  430.           COPY A:DBDEF.* B:
  431.  
  432. and insert your working disk when prompted for A: and the disk to be copied
  433. onto, when prompted for B:. Once the files have been copied across, the files
  434. may be deleted from the working disk by inserting it into the drive and
  435. entering:-
  436.  
  437.           DEL A:DBDEF.*
  438.  
  439. To copy the database definition files onto the disk with the program definition
  440. files, for alterations to the definition, you would use:-
  441.  
  442.           COPY A:<dbname>.* B:
  443.  
  444. where <dbname> is the name of the database. This will copy the appropriate files
  445. from drive A: to drive B: and can also be used to copy them back again, after
  446. modification.
  447.  
  448. 1.6 Main menu
  449.  
  450. When the program has loaded you will be presented with the following menu:-
  451.  
  452.                  PC AtLast: Database Manager
  453.                  ---------------------------
  454.                       (Version 2.xx)
  455.           Copyright (c) Rational Solutions Ltd., 1987,88
  456.             (Program devised and created by Mike York)
  457.  
  458.                  D ... (Re-)Define Database
  459.  
  460.                  A ... Access Database
  461.  
  462.                  Q ... Quit
  463.  
  464.  
  465.                 Enter selection
  466.  
  467. This is the opening menu that will always greet you when you first load PC
  468. AtLast and it is this menu that you will NORMALLY return to having finished
  469. either Defining or Accessing a database. This menu is referred to as the
  470. Database Manager Menu throughout the manual. It is not essential that you leave
  471. PC AtLast by using the 'Quit' option on this menu, as long as you leave it from
  472. either the Database Access Menu or the Database Define Menu (described in the
  473. following two chapters), although it is preferable.
  474.  
  475. Note: It is important that on all occasions you leave PC AtLast by following the
  476. correct procedure, as it ensures that all data is correctly saved and all files
  477. are correctly closed before you leave the program. You should NEVER leave the
  478. program by just removing the disk and switching off.
  479.  
  480. There are two distinct parts to using PC AtLast and these are reflected in the
  481. two choices available (plus the Quit option) in the Database Manager Menu. The
  482.  
  483.  
  484.  
  485.                                      - 8 -
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492. first option '(Re-)Define Database' must be used before you can access the
  493. database and this is where you define (specify the file structure and forms of)
  494. the database.
  495.  
  496. The second choice, 'Access Database', is the one you use to enter records, view
  497. existing data and create reports and listings.
  498.  
  499. Note:If PC AtLast is unable to find the required 'DBDEF' (Definition program)
  500. files or the 'DBUSE' (Access program) files, as appropriate, on the selected
  501. drive, you will be prompted to 'Enter drive identifier'. If the wrong drive is
  502. currently selected, you should specify the correct drive. If the drive is
  503. correct, then the disk containing the required program files should be inserted
  504. into the selected drive and <RETURN> pressed.
  505.  
  506. The following two chapters describe these two options in detail and we recommend
  507. that you read through these chapters thoroughly and then study the Tutorial
  508. chapters, so that by the time you start to create your own database, you are
  509. fully conversant with the operation of PC AtLast.
  510.  
  511. It is also recommended that you take the trouble to design your database fully
  512. before attempting to define it. The short amount of time that is required to
  513. think out the format of a database thoroughly beforehand, is more than
  514. compensated for by the time saved by not having to keep going back and re-
  515. structuring it when you find you have got it wrong.
  516.  
  517. 1.6 Special Editing keys in PC AtLast
  518.  
  519. When PC AtLast has been installed according to the methods described in the
  520. previous section, it will be found that certain of the 'special' keys and
  521. Function keys on the keyboard have been defined to carry out special editing
  522. tasks.
  523.  
  524.      Function            PC Key
  525.  
  526.      Escape              Esc
  527.      Enter               RETURN or Enter
  528.      Left                Left arrow
  529.      Right               Right arrow
  530.      Up                  Up arrow
  531.      Down                Down arrow
  532.      Forward Tab         TAB
  533.      Backward Tab        Shift TAB
  534.      Start of line       Home
  535.      End of line         End
  536.      Back space          BackSpace
  537.      Insert/Overwrite    Ins
  538.      Delete Char         Del
  539.      Delete to end       Ctrl-End
  540.      Insert/split line   F7
  541.      Delete/join line    F8
  542.      Re-margin form      F9
  543.      Set Field Marker    F10
  544.  
  545.  
  546.  
  547.  
  548.  
  549.                                      - 9 -
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.                               2.DEFINITION TUTORIAL
  557.  
  558. In this chapter we shall go through the procedure involved in creating a
  559. database and, having created it, we shall then use it to enter in a few records.
  560. Finally, we shall use this data to experiment with the various methods that are
  561. available to display the information in a variety of ways.
  562.  
  563. We could have picked a very simple 'Name and Address' example, but as PC AtLast
  564. possesses so many features, we have chosen to pick a slightly more involved
  565. example. There is nothing particularly hard or complicated about it and you will
  566. soon find that once you get used to the way in which PC AtLast works, you will
  567. probably be getting ahead of the Tutorial!
  568.  
  569. We recommend that you load PC AtLast and then read through this tutorial,
  570. entering text as instructed. If you find a particular part that you don't
  571. understand, then stop and read the section in the appropriate chapter in the
  572. manual again, before continuing with the tutorial.
  573.  
  574. 2.1 Planning the Database
  575.  
  576. Probably the single most important thing to do is to plan your database. Whilst
  577. it is easy enough to just rush in and define a database and then use it (you
  578. might even find it does what you want!), there will ultimately come a time,
  579. sooner or later (probably sooner) when you will wish you had done it
  580. differently. PC AtLast is quite capable of allowing you to re-define your
  581. database, but in certain cases, this needs a tidy/repair to reorganise the data
  582. and index files and it is never as convenient as getting it right first time and
  583. will take considerably longer to do than it will take you to sit down and plan
  584. it properly from the start.
  585.  
  586. The first thing is to decide exactly what you want the database to achieve. This
  587. may sound obvious, but you will often find that when you actually get down to
  588. planning it, things that seemed unimportant suddenly assume far greater
  589. importance and vice versa.
  590.  
  591. 2.2 Example Definition
  592.  
  593. In this Tutorial, we shall create a database for keeping a record of members of
  594. a Club. We shall assume it is a general sports club, though it could just as
  595. easily be any sort of club. The first thing to do is decide exactly what
  596. information we must store. Obviously we must have a record of each member's name
  597. and address and in this case, we also want to have a record of their telephone
  598. number. We also want a record of when subscriptions were paid and the amount
  599. they paid. As it is a general club, we also want to know what their interests
  600. are.
  601.  
  602. So far, our list of requirements looks something like this:-
  603.  
  604.     Name
  605.     Address
  606.     Telephone
  607.     Amount paid for subscription
  608.     Date subscription paid
  609.     Sporting interest
  610.  
  611.  
  612.  
  613.                                      - 10 -
  614.  
  615.  
  616.  
  617.  
  618.  
  619.  
  620. Perhaps the next thing we ought to do is consider what we are going to do with
  621. all this information once we have entered it, so we shall now consider the ways
  622. that we might want to look at this information and list or print it out. We will
  623. obviously want a form to enable us to enter the information when the person
  624. first joins. To save us work when we send out our newsletters, we will want to
  625. be able to produce address labels. We will also want to be able to produce a
  626. simple list of all members, showing their names and telephone numbers. We also
  627. have a word processor with powerful mail merging facilities and we want to be
  628. able to use the data from the database to send 'personal' letters to each member
  629. on occasions, so some method of creating files that can be read by our word
  630. processor will be required. Our list of ways that we might like to display or
  631. list the information will now look something like:-
  632.  
  633.     Entry form for initial information about a member
  634.     Address label facilities
  635.     The ability to list members' names and telephone numbers
  636.     The ability to 'export' data
  637.  
  638.  
  639. We should consider the ways that we might want to choose which member records
  640. are selected. We would obviously want to be able to select them by name and it
  641. would also be useful to be able to select them by their membership number (That
  642. is a good point. We haven't made any provision for a membership number in our
  643. list of what we want to store in the database, so we must add that to the list).
  644. Our list of items we would like to search with now looks like:-
  645.  
  646.  
  647.     Name
  648.     Membership number
  649.  
  650.  
  651. At this time, we do not want to keep any records of each member's sporting
  652. achievements, but if we did, then we would find it most convenient to keep them
  653. in separate files for each sport, so, in case we ever do want to, have we got
  654. any feature in our database that would be useful to provide a link with any new
  655. databases? Yes, we have. We could use the membership number or the name to
  656. provide a link (it is always useful if our link is also something that we would
  657. normally select a record with and both name and number qualify). If there hadn't
  658. been any sort of logical link, then we would have had to consider whether we
  659. ought to have some further detail, in order to provide this link.
  660.  
  661. We have now got an outline of what our database should look like and after a
  662. check to make sure that we haven't missed anything out, it is time to start to
  663. fill in the details, so we shall start by deciding what type and size each field
  664. ought to be, in order to hold out information.
  665.  
  666. Name - Normally when we look for someone's name, we will look down the list for
  667. their surname and then, if there is more than one person of that name, then we
  668. would look at their initials. We would also sort our list into surname order.
  669. This means that we need to be able to look at the surname first. We could always
  670. enter them into the database as 'Smith J' or 'Bloggs David', but it wouldn't
  671. look very good on our address labels if they were sent out to 'Bloggs David'
  672. etc., so the sensible thing is to separate them into different 'pigeonholes'
  673. (fields). PC AtLast has the ability to have a number of different elements or
  674.  
  675.  
  676.  
  677.                                      - 11 -
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684. 'pigeonholes' for the same field, so we shall make use of this facility and call
  685. our field 'Name' and give it two elements, one for the surname and the other for
  686. the initials or forename. If we give them a length of 20, it should be more than
  687. adequate. As names nearly always start with capitals, but the rest of the name
  688. is in lower case letters, we shall have to use an Alpha type field.
  689.  
  690. Address - Most addresses consist of three or four lines and a post code. It
  691. would be a good idea to make use of a number of elements, as this information is
  692. all of a similar type, but it might also be useful to keep the postcode separate
  693. from the rest, as it might prove useful as something to search on at a later
  694. date (postcodes can provide a useful means of sorting or searching as they are
  695. unique to given areas of the country). A length of 30 ought to be adequate for
  696. the addresses, but the maximum length of a post code is only nine characters, so
  697. we shall settle for 9. The address field ought to be of type Alpha, as we would
  698. normally use an address as a mixture of upper and lower case characters, but the
  699. post code field would benefit from being of type, Upper, as the letters in a
  700. post code are always shown in upper case, so even if we forget when typing it
  701. in, PC AtLast will do it for us.
  702.  
  703. Telephone - The most efficient way to store telephone numbers is by making use
  704. of the dialling code, instead of using the exchange name, not only from PC
  705. AtLast's point of view, but for convenience of use as well. We really ought to
  706. make provision for two telephone numbers, as we might want to contact the member
  707. at work as well as at home, so again, we shall make use of elements. The maximum
  708. length required for a telephone number and dialling code, including allowing for
  709. the space between the parts is 14, but as one of the numbers is a work number,
  710. maybe we ought to allow a few more characters for an extension number, so we
  711. shall settle on 18. We shall also make the field of type Upper, as it will look
  712. neater if any text in the number is consistent.
  713.  
  714. Amount paid - This is always going to be a number and it will also have to show
  715. the pence columns as well, so looking at our list of available field types, we
  716. can see that we should use a 'Fixed' type, as that allows us to specify the
  717. number of decimal points to be used. When deciding on the length, we must allow
  718. for the two figures after the decimal point AND the decimal point when deciding
  719. on what length it needs to be, so, assuming that our subscriptions are going to
  720. be less than £1000.00 per annum, we can settle for a length of 6.
  721.  
  722. Date - This is easy to decide on. We should obviously make use of the 'Date'
  723. type and the length will be decided for us by PC AtLast.
  724.  
  725. Sporting interest - We only provide a certain number of sporting facilities in
  726. our club, in our case, four and the entry will always be one or more of these,
  727. so we can take advantage of the 'Constant' facility and let PC AtLast do some of
  728. the work for us when we come to enter in the data. There is always the
  729. possibility that the club might introduce more sports, so we should also allow
  730. for a few extra interests, to take account of this, so we shall settle for seven
  731. possible elements, as some members may have more than one interest. We will also
  732. have to specify the length and 15 characters is long enough for the sport with
  733. the longest name.
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.                                      - 12 -
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748. We have now considered all our entries, so our list now looks something like:-
  749.  
  750.      FieldName  Type     Elements  Length
  751.  
  752.      Name      Alpha         2       20
  753.      Address   Alpha         4       30
  754.      PostCode  Upper         1        9
  755.      Telphone  Upper         2       18
  756.      MemNum    Serial        1        5
  757.      SubPaid   Fixed         1        6
  758.      DatePaid  Date          1        8
  759.      Interest  Constant      7       15
  760.  
  761. You will see that we have selected our names for the FieldName with some care.
  762. All names have to be no more than 8 characters long and we aren't allowed any
  763. spaces. We have also chosen names that start with different characters, as this
  764. makes life easier when we enter up information at a later stage, but have still
  765. managed to make them meaningful. We could have used words starting with the same
  766. characters, but it would have just made a little more work later.
  767.  
  768. You will also see that we have now included a field called 'MemNum' and that
  769. this is of type Serial. This means that PC AtLast will automatically create our
  770. membership numbers for us, incrementing the number by one for each new record.
  771. Next, we ought to consider how to select/sort our information in more detail.
  772.  
  773. Name - We have already decided that our name is in two elements with the
  774. initials/forename in the first element and the surname in the second, but we
  775. want to sort it with the surname first, so we shall specify Name[2] before
  776. Name[1] in our Index list. Another thing we should consider is whether we want
  777. to 'modify' the information that will be stored in our name index, so that it is
  778. more efficient. One possibility is that we store the names in the index in upper
  779. case (this does not affect the way it is stored in the data file). The advantage
  780. of doing this is that it avoids the problems you come across when sorting names
  781. that may contain upper case letters in the middle (such as MacLaren), which
  782. would otherwise be sorted out of order, so we shall select this option.
  783.  
  784. Membership Number - This is straightforward, as there is only one element and
  785. numeric fields may not be 'modified' in any way. Our list of items we would like
  786. to sort/index on now looks like:-
  787.  
  788.  
  789.      IndexName  Field[El]     Function
  790.  
  791.      MemName    Name[2]       Convert to upper
  792.                 Name[1]       Convert to upper
  793.  
  794.      NumMemb    MemNum
  795.  
  796.  
  797. At this stage, we are now ready to start entering information into PC AtLast, as
  798. we shall sort out how the information will be displayed/listed after we have
  799. defined our database.
  800.  
  801.  
  802.  
  803.  
  804.  
  805.                                      - 13 -
  806.  
  807.  
  808.  
  809.  
  810.  
  811.  
  812. 2.3 Entering the Definitions
  813.  
  814. Load PC AtLast as described in 'Getting Started' and select D from the Database
  815. Manager Menu. This will take you to a screen where you will be asked to enter
  816. the directory path that you require. You should now enter the directory path
  817. that you want to store the database on and press the <RETURN> key.
  818.  
  819. Note: You should NEVER select a RAM drive to be the drive on which the
  820. definitions/data will be stored. If you forget to copy the files back onto a
  821. proper disk afterwards, all your definitions will be lost.
  822.  
  823. Under the heading Database: enter CLUB, as that is the name that we are going to
  824. give our database and press <RETURN> once more. After a second or two, whilst PC
  825. AtLast searches the directory path to see whether the database already exists,
  826. the message,
  827.  
  828.              Unable to open CLUB.DEF ... Define New Database (Y/N)?
  829.  
  830. will appear. this means that it hasn't found a database of that name. As we do
  831. want to define a new database, press Y.
  832.  
  833. The screen will clear once more and the File Definition screen will appear.
  834. Beneath the heading 'FileName' will be the word 'SYS-CLUB' with the cursor round
  835. it. The cursor in most PC AtLast screens consists of a pair of square brackets,
  836. and it might also appear in changed intensity or inverse, depending on the model
  837. of computer being used. 'SYS-CLUB' is the name of the System file that will
  838. eventually hold our Constant and Serial data and before doing anything else we
  839. ought to define the fields that will eventually hold these values. Press
  840. <RETURN> to select SYS-CLUB.
  841.  
  842. The Field Definition screen will appear. This will be largely empty, apart from
  843. a column of numbers down the left hand side and a heading across the top. The
  844. cursor will be in the FieldName column and row 1. Enter Sports and press
  845. <RETURN>. This is the field that will contain the names of our sports and we
  846. shall always display them in upper case, so type in U and press <RETURN>. The
  847. rest of the word 'Upper' will then fill the space and the cursor will move to
  848. the next column. This is the first example you have seen of PC AtLast's attempts
  849. to help you. Because it knew what sort of information it should receive, it
  850. could select the correct entry, once it had sufficient characters.
  851.  
  852. We have already decided that there are four possible sports, but this might grow
  853. to seven, so we shall enter 7 under Elements. Enter 15 under Length as we
  854. decided that was sufficient and press <RETURN>. From now on we won't bother
  855. telling you to press <RETURN> every time, only when necessary, or if some other
  856. keys has to be pressed.
  857.  
  858. The cursor will now have moved down into column 1 of the next line, ready for
  859. the next field entry. Note that the right hand column Size has been filled in
  860. for you by PC AtLast.
  861.  
  862. You should now enter the details for the associated field that will hold the
  863. next number to be used as a membership number, so enter NextNum, I, 1 and 5, to
  864. name of the field and define it as being of type Integer, having one element and
  865. being five digits long. The cursor will have moved across to the Sign column
  866.  
  867.  
  868.  
  869.                                      - 14 -
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876. this time. Press <RETURN> to confirm the default setting of 'N', as we don't
  877. want negative membership numbers!
  878.  
  879. As we have no more entries to make in the SYS-CLUB file we can now press <Esc>
  880. to indicate that we have finished. We will now return to the original screen,
  881. but with the cursor beneath the Can Edit column. We needn't concern ourselves
  882. with these entries at the moment, so just press <RETURN> and the cursor will
  883. move down into the first column on the next line.
  884.  
  885. We have now got to define the main file that we will use for the storage of all
  886. our data and we shall call this 'Members', so type in Members. The screen will
  887. be replaced with another Field Definition screen and you can now start to enter
  888. the details that we decided on when designing the database. Start by entering
  889. Name, A, 2 and 20. You can then do the same for 'Address', 'PostCode' and
  890. 'Telphone' using the values we decided on earlier. When you enter up the details
  891. for 'MemNum', you will find that once you have specified 'Serial', it will
  892. automatically fill in the Elements column and move to the Field[El] column. PC
  893. AtLast is now asking what field in the System file we wish to relate the Serial
  894. field to. We named the field in the System file 'NextNum' and if you look at the
  895. bottom of the screen, you will see that the available names are displayed for
  896. us, in case we can't remember. Type N and press <RETURN> and PC AtLast will fill
  897. in the rest of the word for us. Press <RETURN> once more, to confirm the choice
  898. and the cursor will move down for the next field to be entered.
  899.  
  900. You should now enter the details for 'SubPaid' and this time you will find that
  901. the cursor moves to another different column, the Sub-length column. PC AtLast
  902. is now waiting for you to specify how many decimal points you want, so enter 2
  903. and accept the default value 'N' for the sign, as we don't want any negative
  904. value subscriptions either!
  905.  
  906. Fill in the entry for 'DatePaid', using the 'Date' type, 1 Element and PC AtLast
  907. will pass over the Length and go straight to the Sub-length column. This time it
  908. wants to know how many digits you want in the year. The bottom of the screen
  909. will be prompting you for '2' or '4'. Select 2.
  910.  
  911. You can now enter in the last field, which is the Constant field and you will
  912. find that yet again PC AtLast will pass over the invalid columns and stop in the
  913. Field[El] column. This time, if you look at the bottom of the screen, you will
  914. see that the System field name, 'Sports' that we entered earlier, is displayed.
  915. Type S and press <RETURN> twice, to select it and confirm it.
  916.  
  917. You have now finished defining the fields, which wasn't too painful, so now
  918. press <Esc> to say you have finished.
  919.  
  920. 2.4 Index Definition
  921.  
  922. The right hand side of the screen will have cleared when you pressed <Esc> and
  923. will have been replaced with new headings and the cursor in the first column,
  924. IndexName. Enter 'MemName'. The next column is Duplicates and PC AtLast is
  925. asking whether duplicates should be permitted. As it will be quite acceptable in
  926. this case for there to be two or more members with the same name, you should
  927. type Y to change the setting. Next you are asked for the Field[El], which is the
  928. field that you want the index to be created on. Type N and press <RETURN>.
  929.  
  930.  
  931.  
  932.  
  933.                                      - 15 -
  934.  
  935.  
  936.  
  937.  
  938.  
  939.  
  940. Now you know why we chose to give all the field names different starting
  941. letters, as it has filled in the remainder for you. Press <RETURN> once more, to
  942. confirm the choice and the cursor will move to the [El] column. The program is
  943. now waiting for you to say which element of 'Name' you want, so press 2 to
  944. select the second element. Press <RETURN> to select the offered length and then
  945. select 1 to tell PC AtLast  that you want it to save the index as upper case.
  946.  
  947. The cursor will now have moved down to beneath the 'Field[El]' column again,
  948. waiting for the next part of the index to be given. Press N again and confirm it
  949. and then 1 to specify that you want the first (forename) element of the 'Name'
  950. field. This time, it will tell you that you can have a length of '5'. this is
  951. because the maximum length of an index entry is 30 and we have already used 25.
  952. In this case, it is alright, but if it hadn't been, we could have  backed up to
  953. the previous level, using the Up Cursor and altered the value of the first
  954. entry, so that they were more balanced. Select 1 again to make the entry upper
  955. case.
  956.  
  957. Once more, the cursor will have moved down beneath the Field[El] column, but
  958. this time we don't want to enter a third index element, so we can just press the
  959. Down Cursor key to move on. This time, the cursor will move back to the
  960. IndexName column so that we can enter another Index name. You can now type in
  961. the entry for the 'NumMemb' index entry, but select N in answer to Duplicates as
  962. we don't want to have more than one member with the same number. This time we
  963. want to index on the 'MemNum' field, so type that in now and confirm it.
  964.  
  965. As we don't have any more Index entries to make we can simply press <Esc> twice
  966. to indicate that we have finished and once more we shall be taken back to the
  967. File Definition screen. Once again we shall just accept the default entries for
  968. Can Edit, Can Delete etc. As we may want to alter data later on. The 'Advanced
  969. Use' chapter gives details on how to make use of these options to protect data.
  970.  
  971. Finally, press <Esc> again and this time a menu at the bottom of the screen will
  972. prompt you to
  973.  
  974. Save, Edit, List, ESC?
  975.  
  976. Type S to save the database definitions, then <Esc> to indicate you have
  977. finished with this part of the program.
  978.  
  979. You will now find yourself in a new menu, the Database Definition Menu. This is
  980. the menu that will normally greet you when you load an existing database and
  981. want to change it in some way, but which was bypassed when you first started
  982. this session, because there was no existing database.
  983.  
  984. You have now finished defining your first database, but there is still one more
  985. thing that you have to do before you can make full use of it. You have still got
  986. to create the forms that we decided are required and to do this, you should type
  987. F, to select the Form Definitions option.
  988.  
  989. 2.5 Defining Forms
  990.  
  991. Creating forms is a bit like using a word processor in many respects, but with
  992. the difference that whereas a word processor will normally only accept text that
  993. you type in, when creating a form we can also insert 'field markers'. Field
  994.  
  995.  
  996.  
  997.                                      - 16 -
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004. markers, which are inserted by pressing the F10 key, have the effect of
  1005. inserting the current contents of the field into the text when we later display
  1006. it or of marking the place where a field will be entered when we come to enter
  1007. the data.
  1008.  
  1009. We have already decided that we will need four different forms, so it is time to
  1010. start on creating the first form. If you haven't already chosen the Form
  1011. Definition option by pressing F from the Database Definition Menu, then you
  1012. should do so now. The screen will clear and at the bottom will appear the
  1013. request:
  1014.  
  1015. Get (a form), Create (a new form), ESC?
  1016.  
  1017. For now, select 'Get' by typing G.
  1018.  
  1019. You will be informed that there are Forms available: and beneath it will be the
  1020. names of the available forms. In this case, MEMBERS and SYS-CLUB. These are the
  1021. 'default' forms that PC AtLast automatically creates when we define a database.
  1022. It will create one form for every file in the database, with the exception that
  1023. it will only create a 'SYS-????' form if there are any fields actually defined
  1024. in the 'SYS-????' file.
  1025.  
  1026. If you select the MEMBERS form, by typing M and pressing <RETURN> twice (to
  1027. select the full name and then confirm the choice), you will be presented with a
  1028. screen appearing much like the following example:-
  1029.  
  1030. Name      : Name[1]_____________ | Name[2]_____________
  1031. Address   : Address[1]____________________ | Address[2]____________________
  1032.             Address[3]____________________ | Address[4]____________________
  1033. PostCode  : PostCode_
  1034. TelPhone  : TelPhone[1]_______ | TelPhone[2]_______
  1035. MemNum    : MemNu
  1036. SubPaid   : SubPai
  1037. DatePaid  : DatePaid
  1038. Interest  : Interest[1]____ | Interest[2]____ | Interest[3]____
  1039.             Interest[4]____ | Interest[5]____ | Interest[6]____
  1040.             Interest[7]____
  1041. _______________________________ End Of Section _______________________________
  1042.  
  1043. ______________________________________________________________________________
  1044. Form: Members      File: Members   Section: Body
  1045.  
  1046. Edit, Head, Body, Tail, Save, Get, Delete, Rename, Create, ESC?
  1047.  
  1048. This is the default screen created by PC AtLast for the members file and if you
  1049. study it, you will see that the left hand side of the screen consists of a list
  1050. of the fields that we defined. This is a text description. To the right of the
  1051. colon (:) following the description, you will notice that the field name is
  1052. repeated and in the case of those fields that have more than one element, it is
  1053. repeated once for each element, followed by its element number in square
  1054. brackets. These are field markers and if there are more than one on a line, they
  1055. are separated by a short vertical line.
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.                                      - 17 -
  1062.  
  1063.  
  1064.  
  1065.  
  1066.  
  1067.  
  1068. You will also notice that some of the field markers are abbreviated, whilst
  1069. others are followed by an 'underline'. The reason for this is that the field
  1070. markers are used to show the length of the fields, so small fields are
  1071. abbreviated, whilst longer ones are padded out with underlines.
  1072.  
  1073. Looking at the form, it is obvious that it would make a good starting point for
  1074. our entry form that we will need for entry of data, but the layout, whilst being
  1075. functional, could be made neater for our use (PC AtLast doesn't know how we want
  1076. it to look, so it always creates forms in this layout).
  1077.  
  1078. This is the 'Body' of the form, as indicated by the Section: heading on the
  1079. Status line. This is the main part of a form and is always displayed when we
  1080. choose to Add or Scan information. The other two parts of a form, the 'Head' and
  1081. 'Tail' are only used when we List. As this form is primarily intended for use
  1082. when Adding or Scanning records, we shall ignore them for now.
  1083.  
  1084. Type E to select the Edit option that is displayed at the bottom of the screen.
  1085. This will move the cursor to the top left hand corner of the screen and it will
  1086. now appear as the normal cursor that we come across in most programs, rather
  1087. than the 'square bracket' cursor we have become used to in PC AtLast. If you now
  1088. use the Right Cursor key to move the cursor across the screen, you will find
  1089. that as soon as it comes to the first field marker, the cursor will change to a
  1090. highlight of the size of the field. If you now look at the bottom of the screen,
  1091. you will see that the bottom line menu now says
  1092.  
  1093. Field Marker : Edit, Nudge, Delete, <Cursor>?
  1094.  
  1095. These are the options that are available when you are in a field marker. For
  1096. now, just use the Right Cursor key again and you will find that the original
  1097. small cursor reappears immediately after the field marker. This is because, as
  1098. far as form editing is concerned, a field marker is a single character.
  1099.  
  1100. How can we improve the appearance of the form? Well, the name might look better
  1101. if it was on two lines. The first element should have its description changed to
  1102. 'Forename' and the second element to 'Surname'. Similarly, the address field
  1103. elements would look better on separate lines. You might also think that the
  1104. 'Telphone' field would look better on two lines with 'Home' and 'Business'
  1105. descriptions. For now we shall sort out the name and address fields and you can
  1106. then experiment with any further changes you want to make.
  1107.  
  1108. Press the <Home> key now and the cursor will return to its starting position at
  1109. the top left of the screen. You can now type in Forename. You will notice that
  1110. it overwrites the existing description. By default, PC AtLast is in overwrite
  1111. mode. Carry on moving the cursor across the screen with the right Cursor key,
  1112. through the first field marker, until it is positioned over the short vertical
  1113. line between the field markers, then press <Del> until the cursor moves up to,
  1114. but not into the Name[2] field marker. Press F7 now and you will find that the
  1115. line has been split at the cursor position. If you now press <RETURN> you will
  1116. find that the cursor moves down to the start of the next line, but without
  1117. inserting a new line.
  1118.  
  1119. Try typing in Surname and you will find that the cursor will soon move into the
  1120. field marker, whereas we really want to move the marker across so that it lines
  1121. up with the first element. Press N and you will find the field marker moves
  1122.  
  1123.  
  1124.  
  1125.                                      - 18 -
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132. across one space, so that we are once more out of the field marker. The N is one
  1133. of the Field marker editing commands and is for just that purpose (to move the
  1134. field marker one column to the right). We could keep doing this for each
  1135. character we still need to enter, but it is more convenient to toggle into
  1136. 'Insert' mode by pressing <Ins>, so do that now. You can now type in the rest of
  1137. your 'Surname' description, followed by the colon and spaces until the field
  1138. marker lines up with the first one. You can toggle in and out of insert mode as
  1139. you require, with the <Ins> key. The current mode is always displayed on the
  1140. Status line.
  1141.  
  1142. You can now modify the address fields in the same way and also the 'Telphone'
  1143. fields. Don't forget to alter the description to 'Telephone' whilst you are
  1144. doing it and you can also change any other descriptions you want.
  1145.  
  1146. The form might look a little better if there was a blank line between 'Telphone'
  1147. and 'MemNum', so move the cursor down to the 'MemNum' line and position it in
  1148. column 1, then press F7 and the whole line will move down, leaving a blank line.
  1149. Do the same with 'Interest', so that the interests are also separated from the
  1150. details of the member by a blank line.
  1151.  
  1152. Once you have finished altering the form, you can press <Esc> to say you have
  1153. finished and the original editing menu at the bottom of the screen will re-
  1154. appear. You should now type S to tell PC AtLast to 'Save' the form, then, once
  1155. the Saved message appears, press <Esc> again, to say you are finished with this
  1156. form. You will now be back at the Database Definition Menu.
  1157.  
  1158. We shall now create the 'list of member names and telephone numbers' form, but
  1159. this time we shall use the 'Create' option instead. Select F for 'Form
  1160. Definitions' and this time C to create a new form. We are asked to Enter Form
  1161. Name, so we should think of a suitable name for the form. Type in ListMembers
  1162. and press <RETURN> (you will notice that with Form names we are not restricted
  1163. to only eight characters) and PC AtLast then asks us to Enter File Name. We
  1164. should specify the name of the file from which we want PC AtLast to take its
  1165. information (or for that matter, what file we want it to put new information
  1166. into!) and in this case, as we only have one file, apart from SYS-CLUB, you can
  1167. type in M and press <RETURN> twice. If you look above the status line, you will
  1168. see a list of available file names.
  1169.  
  1170. This time, an empty form will appear on screen, with the cursor in the top left
  1171. corner. We don't want any descriptions in the body of the form this time, as we
  1172. are creating a form to make a list of details. Instead, we shall eventually put
  1173. the headings for the columns into the 'Head' of the form.
  1174.  
  1175. Press the F10 key and immediately a question mark (?) will appear and at the
  1176. same time, the 'Field Marker' menu will appear at the bottom of the screen. The
  1177. '?' is the default field marker that PC AtLast uses when it doesn't know which
  1178. field you wish to use. Normally, it assumes you want the next field in the list,
  1179. after the one you last used, or else the last field you deleted (if you had
  1180. deleted one), but because you haven't yet used one, it does not know.
  1181.  
  1182. Type E, to 'Edit' the field marker and at the bottom right of the screen a list
  1183. of the available fields will appear. Type N to select the 'Name' field and then
  1184. confirm it, as usual. You will see it displayed beneath the Status line. Now
  1185. type 2, to say you want the second element. You are now asked whether you wish
  1186.  
  1187.  
  1188.  
  1189.                                      - 19 -
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196. to Omit leading and trailing spaces?. If you answer 'N' to this, then when the
  1197. form is listed, all fields will be displayed to their full length, as specified
  1198. in the field definitions. this would not be very good if we wished to have the
  1199. forename followed by the surname, say in an address label, as it would appear
  1200. something like 'John                     Smith', in which case you would select
  1201. 'Y' and PC AtLast would then remove all spaces at the start and end of each
  1202. field, but in this case, we wish to keep our list all tidily lined up, so press
  1203. <RETURN> to select the default N value.
  1204.  
  1205. You can now move out of the field marker by pressing the Right Cursor key and
  1206. you will find the '?' marker replaced by the proper field marker. Move the
  1207. cursor across a space and position another field marker with F10. Note that this
  1208. time PC AtLast gives you the next field it knows, 'Address[1]', which in this
  1209. case is not the one we want, so press E again, to 'Edit' the marker and clear
  1210. the 'Address' name with <Ctrl-End>, then type N to select the 'Name' field again
  1211. and this time, select the first element. Repeat the process for the first
  1212. telephone number element.
  1213.  
  1214. We now have a problem, as there is insufficient room for the second telephone
  1215. number on the same line as the rest, so this is where we must make use of the
  1216. facility to tell PC AtLast to treat separate lines as one line when printed. We
  1217. do this by typing a backslash (\) at the end of the first line, so move the
  1218. cursor across again and type \. You can now press <RETURN> to move to the start
  1219. of the next line. Enter the field marker for the second telephone number now.
  1220.  
  1221. We have now entered all the information that we require in the list, so press
  1222. <Esc> to finish editing the body of the form. We now want to create some
  1223. headings for our form, so select H for 'Head', from the bottom line menu and a
  1224. blank form will appear again. If you look at the Status line, you will find that
  1225. it now shows Section: as Head.
  1226.  
  1227. All you have to do is type in suitable headings spaced appropriately across the
  1228. screen and continue on the next line, having used the '\' at the end of the
  1229. first line. when complete, press <Esc> then use S to 'Save' the form.
  1230.  
  1231. It is also possible to put field markers in the 'Tail' section of a form. In
  1232. this section they become 'Total' Markers. The special marker '#####' is used to
  1233. show the number of records listed. The total of any numeric field will be
  1234. displayed in the place of a Total Marker for that field. Try it and see.
  1235.  
  1236. That completes the second form and by now you should be quite able to produce
  1237. the other two forms with little trouble. A suggested layout, with a few notes,
  1238. is shown for each of them:-
  1239.  
  1240. "Name[1]__________________","Name[2]__________________",\
  1241. "Address[1]____________________","Address[2]____________________",\
  1242. "Address[3]____________________","Address[4]____________________",\
  1243. "PostCode_"
  1244. _______________________________ End Of Section _______________________________
  1245.  
  1246. This is the Export form, for exporting data to other programs that require
  1247. 'comma-delimited' fields. The following points should be noted. The commas,
  1248. quotation marks and the backslash are typed in as text, but the remainder
  1249. consists of field markers. If you want all fields to be a fixed length, then you
  1250.  
  1251.  
  1252.  
  1253.                                      - 20 -
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260. should make sure the first field marker is set to 'N' for 'Omit leading and
  1261. trailing spaces'. If you want the minimum size, then select 'Y' to this option.
  1262. After setting the first field, all others will default to the same setting, so
  1263. you can quickly select each field marker and accept the default name and setting
  1264. for each subsequent field marker. You can add as many field markers as you want,
  1265. making sure to finish each line (except the last line) with a '\'.
  1266.  
  1267. The following is a suitable form for labels:-
  1268.  
  1269.                  Name[1]__________________ Name[2]__________________
  1270.                  Address[1]____________________
  1271.                  Address[2]____________________
  1272.                  Address[3]____________________
  1273.                  Address[4]____________________
  1274.                  PostCode_
  1275.  
  1276. _______________________________ End Of Section_______________________________
  1277.  
  1278. The 'Labels' form contains nothing but field markers and the 'Omit leading and
  1279. trailing spaces' option is set to 'Y', so that there will be no unsightly gaps
  1280. when printed. Note that in this case, we have positioned the field markers part
  1281. way across the screen. This was done so that the form could also be used for
  1282. addressing individual envelopes as well. If your printer will not allow you to
  1283. position the labels across the screen, then you should set the field markers
  1284. nearer the left hand side.
  1285.  
  1286. Create these two forms now and then press <Esc> after saving, to escape back to
  1287. the Database Definition Menu and you have now completed defining your first
  1288. database with PC AtLast, so press 'Q' to quite the definition program.
  1289.  
  1290. In the next chapter, we will look at how we may use the database, now that we
  1291. have defined it.
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.                                      - 21 -
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.                                3. ACCESS TUTORIAL
  1325.  
  1326. Now that we have defined our database, we can start to enter data into it, so
  1327. type A from the Database Manager Menu, to access the database.
  1328.  
  1329. If we have just returned from defining the database when we select this option,
  1330. then PC AtLast will assume that we want to use the database that we have just
  1331. defined, so it will automatically load it for us. If we have only just loaded PC
  1332. AtLast, then we will be prompted to specify the directory path and the name of
  1333. the database we want to use.
  1334.  
  1335. The next thing that will happen is that a message will appear, telling us that
  1336. we must initialise the System record using the Scan/Update option. This is
  1337. because PC AtLast knows that we have specified a number of fields in the SYS-
  1338. CLUB record. If we hadn't defined any, then PC AtLast would not have bothered to
  1339. warn us.
  1340.  
  1341. 3.1 Filling in the System Record
  1342.  
  1343. We can now select what we want to do, from the Database Access menu and, as we
  1344. have just been warned, we should select the Scan/Update option so that we can
  1345. initialise the System record, so enter S and we will be informed that a number
  1346. of forms are available (the ones that we have just created), including one
  1347. called SYS-CLUB. This is the default System Form, so press S and then <RETURN>,
  1348. twice, to select and confirm the choice.
  1349.  
  1350. The screen will clear once more and a 'blank' form appear, complete with a
  1351. Status line towards the bottom of the screen and beneath that a menu of
  1352. available commands. When we are using 'Scan/Update' normally, the options that
  1353. are available will change according to the situation and will only show those
  1354. commands that are valid at that time. At the moment it says,
  1355.  
  1356. Form, Edit, Print, Esc?
  1357.  
  1358. We want to 'Edit' the form, so type E and the cursor will move to the first
  1359. field marker in the form (Note that when we were creating the forms, the field
  1360. markers were displayed, but when we are using them, only the 'text descriptions'
  1361. are displayed) and it will appear as two square brackets marking the limits of
  1362. its length. It may also be highlighted, depending on the model of computer being
  1363. used.
  1364.  
  1365. In this form, the first field is the first element of the 'Sports' field. Enter
  1366. Badminton, Squash, Tennis and Swimming, into the elements, ending each with
  1367. <RETURN>. Finally press Down Cursor to indicate that you have finished with this
  1368. field.
  1369.  
  1370. The cursor will now have moved down to the field headed Number. This is the
  1371. numeric field that will normally hold the next value for our membership number,
  1372. so type in 1 as we want our numbers to start at the beginning.
  1373.  
  1374. We have now completed entering the data for the System record, so you can type S
  1375. to save the record,or use either 'R' to Re-do the form, or the Up Cursor key to
  1376. move back up from the bottom of the form, making whatever alterations are
  1377.  
  1378.  
  1379.  
  1380.  
  1381.                                      - 22 -
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388. necessary, before saving it. Press <Esc>, once the record has been saved and you
  1389. will return to the Database Access Menu.
  1390.  
  1391. 3.2 Adding Records
  1392.  
  1393. We are now ready to enter up a few records into the database, so press A to 'Add
  1394. Records in batch', but this time, when asked to select a form, specify the
  1395. MEMBERS form. As you are going to type in the records at the keyboard, select K
  1396. for keyboard input.
  1397.  
  1398. You can now enter up the details for the first member. You will see that the
  1399. membership number contains the number '1'. When you enter the date, enter
  1400. 1/1/87. You will find that PC AtLast will automatically add the required leading
  1401. zeroes to single character months or days parts of the date.
  1402.  
  1403. When you come to the 'Interest' part of the form, if they don't have any
  1404. interests, you can simply press <Esc> to indicate that there is no more to
  1405. enter, or type sufficient letters of the interest to make it identifiable. Type
  1406. S to select 'Swimming' and press <RETURN>. If you now look at the entry, you
  1407. will find that PC AtLast has selected 'Squash'. This is because both 'Squash'
  1408. and 'Swimming' start with an 'S', but we originally entered 'Squash' first.
  1409. Press <Ctrl-End> to clear the field and this time, type in SW before pressing
  1410. <RETURN>. This time, PC AtLast will select the entry we want, so press <RETURN>
  1411. again to confirm the entry. If the member has more than one interest, then you
  1412. can now enter them as well. When you have no more to enter, press <Esc> to say
  1413. you have finished, then type S to save the record.
  1414.  
  1415. Note: You might have found it useful to have entered the names of the various
  1416. interests onto the form, as a reminder of the valid entries. If you want to do
  1417. this when you have finished entering records, you can go back in to the Form
  1418. Definitions, 'Get' the form and add the required text, before re-saving the
  1419. modified form. You can alter forms in this way at any time.
  1420.  
  1421. The form will clear and you are now ready to enter the next record. Enter up
  1422. five or six more records now, giving them a variety of different interests. When
  1423. you have finished, press <Esc> once more and you will return to the Database
  1424. Access Menu.
  1425.  
  1426. 3.3 Scanning the Database
  1427.  
  1428. Now that we have a few records in our database, it would be a good idea to have
  1429. a look at the different ways in which they may be scanned and altered.
  1430.  
  1431. Type S to 'Scan/Update' the database and you will be asked which form you want
  1432. to use. Select the 'Members' form once more, by typing M and confirming it. The
  1433. chosen form will be displayed and you will now be asked Which Index order?, with
  1434. a list of the available Index names on the line above. Type N, to select the
  1435. 'NumMemb' index and confirm the choice. The cursor will now appear in the first
  1436. field element that was specified in the index. In this case, there is only one
  1437. and it is the membership number field. Type in 3 and press <RETURN>.
  1438.  
  1439. The form will then fill in with the record for the member with a membership
  1440. number '2'. Press N, 'Next' and the next record will appear. Press B for 'Back'
  1441. and the previous record will appear. You will see that the order in which they
  1442.  
  1443.  
  1444.  
  1445.                                      - 23 -
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452. are displayed is the membership number order, rather than the order you entered
  1453. them. This is because they are in the order set by the 'NumMemb' Index.
  1454.  
  1455. Type I, to select the 'Index' command and this will allow you to select a
  1456. different index order for the records to be displayed. Select the 'MemName'
  1457. index. Nothing will appear to have changed, but if you now use 'B' or 'N' to
  1458. move backwards and forwards through the records, you will see that they are now
  1459. ordered around the member's name instead of the membership number.
  1460.  
  1461. We now decide that we want to look for a member's record, or a group of members
  1462. and there are two ways that we can do this. If we just want to browse through
  1463. the members with names beginning with 'S' for example, we first of all make sure
  1464. that the index is 'MemName' and then press S, to 'Search'. The form will clear
  1465. and The cursor will be positioned in the first element of the 'MemName' index,
  1466. which is the Forename element. Press <RETURN>, as we want to search on the
  1467. surname (<RETURN> will make PC AtLast start searching at the beginning of a
  1468. field), then type S in the Surname field and press <RETURN>. The form will fill
  1469. with the record for the first person whose name begins with a letter 'S'. You
  1470. can then use 'N' to browse through the rest of the members beginning with 'S'.
  1471.  
  1472. Secondly, we can scan a group of records by setting 'Conditions'. Type C, to
  1473. select 'Conditions' and the screen will clear and be replaced with the
  1474. 'Conditions Screen'. Setting 'Conditions' lets you specify certain conditions
  1475. that must be met for a record to be displayed. One advantage of this method of
  1476. searching is that it is not necessary to use a field that is part of the current
  1477. index, or even an index at all. We want to see all the members whose interest is
  1478. 'Swimming' AND whose name begins with 'B' in this example. The cursor is
  1479. positioned under a column called Field and at the bottom of the screen is a list
  1480. of all the fields in the data file. Type I to select 'Interest', then 0 as
  1481. 'Swimming' could be any entry in the 'Interest field' elements and you are then
  1482. asked to enter a comparison operator and the available options are shown at the
  1483. bottom of the screen. Type EQ, for 'EQuals' and then you must enter the value
  1484. that you want it compared with. In this case, we want 'Swimming', so type
  1485. Swimming.
  1486.  
  1487. We now want to specify the initial letter of the member's surname, so enter N
  1488. and 2 to specify the second element. We want it to be either equal to or after
  1489. the letter 'B', so select EA and B for the condition value. That would select
  1490. all names from 'B' onwards, so we must also specify where it is to stop, so
  1491. select 'Name[2]' again and this time specify BF, indicating that it must be
  1492. before 'C'. If you now press <Esc>, you will return to the original scanning
  1493. screen, complete with the current record displayed. If this record does not meet
  1494. the condition, a message will tell you. You may then either start the search
  1495. from the beginning by using 'Search', or continue using 'B' and 'N' to browse
  1496. through.
  1497.  
  1498. You will now find that PC AtLast will run through all the records until it finds
  1499. one that matches the Conditions that you set. Pressing 'N' or 'B' again will
  1500. continue the search. These conditions will stay in force until either you cancel
  1501. them, or you leave the file you are using. To cancel a set of conditions, or
  1502. alter existing ones, you simply press C again and then edit the existing
  1503. conditions. If you want to remove all, or some, of them, then position the
  1504. cursor on the unwanted entry and press the F8 key. When finished, <Esc> back to
  1505. the scanning screen.
  1506.  
  1507.  
  1508.  
  1509.                                      - 24 -
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516. Whilst we are in the Scan/Update screen, we can also Add new records, Edit
  1517. existing records, or Delete records (depending on the settings specified in the
  1518. definitions, regarding adding, altering and deleting). Typing A will give you a
  1519. clear form in which you can enter the new record, whilst E will move the cursor
  1520. into the existing form and you can then move around it using the Up and Down
  1521. Cursor keys, altering entries at will. Selecting D will result in you being
  1522. asked to confirm that you want to delete the form before it is erased from the
  1523. file forever.
  1524.  
  1525. There are two further commands available when using the Scan/Update option. The
  1526. first of these is 'Form'. Type F and the available forms will be listed. Type L
  1527. and confirm. The form on screen will change to the 'Labels' form, containing the
  1528. details from the current record. This provides an ideal way to switch between
  1529. different views of the same record, frequently with some of the forms only
  1530. showing selected data, as in the case of 'Labels'.
  1531.  
  1532. As we now have a form on screen suitable for printing an address on an envelope,
  1533. it is time to try the last command. Type P, to select 'Print' and the form will
  1534. be replaced with a list of Print Parameters. If the default settings are ideal
  1535. for printing on 11" continuous stationery, but if we want to address one or two
  1536. envelopes, we should elect to Change Parameters by typing Y. The cursor will
  1537. move into the parameter list and you can then move it down to the second line
  1538. and change the Single Sheet Paper, Use Form Feeds and Page Each Record settings
  1539. to Y. This has the effect of ensuring that when an address is printed, the
  1540. envelope will be ejected.
  1541.  
  1542. You may also select between sending the output to the Screen or a disk File. the
  1543. default setting is 'Printer', but may be changed by typing either 'S' or 'F'.
  1544. The only time that printing to the screen may be found of any great use is when
  1545. you are using a form that is too long to be displayed on the screen at one time.
  1546. You could view the full screen by using the 'Edit' option and scrolling the form
  1547. with the Cursor keys, but it may also be viewed by printing it to the screen.
  1548.  
  1549. That completes a run through most of the facilities available in the Scan/Update
  1550. option and we recommend that you should experiment with all the options until
  1551. you are happy that you understand them.
  1552.  
  1553. There is one more way that we can view and print the information in the database
  1554. and that is by making use of the 'List Data' option from the 'Database Access
  1555. Menu, which will be described next. For now, when you have finished
  1556. experimenting with the database, press <Esc>, to finish Scanning the database.
  1557.  
  1558. 3.4 Listing Data
  1559.  
  1560. This facility may be used for many purposes, but the main use is to enable you
  1561. to produce listings of your data.In the previous section, we looked at records
  1562. as individual items. Listing looks on them as being part of a group and allows
  1563. you to print all records, or only selected records in the form of lists.
  1564.  
  1565. Type L from the Database Access Menu and you will be asked to specify the form
  1566. you want to use. Select the 'Memberlist' form by typing ListMembers form in the
  1567. usual way and select the MemName index, as we want our listing in alphabetical
  1568. order.
  1569.  
  1570.  
  1571.  
  1572.  
  1573.                                      - 25 -
  1574.  
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580. We are now presented with a screen containing a Status line at the top and a
  1581. list of available commands at the bottom. Many of the commands will be familiar
  1582. and serve the same purpose as in the Scan/Update option, but some are new. The
  1583. 'Ascending' and 'Descending' commands let you select whether the listing is in
  1584. the normal Index Order, or in reverse order. As the default setting is
  1585. 'Ascending', we don't need to change the order because we want the list in
  1586. alphabetical order. We don't need to set any conditions, as we want to list  all
  1587. members. Neither do we want to specify a 'Range', for the same reason (Range
  1588. allows us to specify the starting point in the Index from which records will be
  1589. listed and also the ending point).
  1590.  
  1591. All we need to do now is 'List' the file. This is virtually the same as the
  1592. print option in Scan/update and we are offered the current print settings and
  1593. the opportunity to alter them. We want to send the listing to the printer, so,
  1594. unless any of the defaults have been changed since PC AtLast was loaded, you can
  1595. press N to indicate you don't want to change the parameters. In this case, we
  1596. don't want to print the 'Selection conditions', so you can answer N to that
  1597. also.
  1598.  
  1599. At this point, you should make sure that the printer contains suitable paper and
  1600. that it is 'On-line', before pressing a key to list the data to the printer. As
  1601. each record is sent to the printer, the contents of the index fields will be
  1602. displayed on screen, so that you can watch progress (This also happens when a
  1603. listing is sent to a disk file and is very useful as it is the only indication
  1604. of what is happening). When completed, we are asked to press a key to continue
  1605. and the Listing Screen will re-appear, so that we can carry out further listings
  1606. if we want.
  1607.  
  1608. We recommend that you now experiment with different settings for Range,
  1609. Conditions and forms, until you are happy you know how to set the various
  1610. options.
  1611.  
  1612. By this time, you should be feeling at home with the way that PC AtLast is used
  1613. and you should be ready to create and use your own database. The only main
  1614. feature that we have not covered is the 'Tidy/Repair Database' option, but you
  1615. will only need this if you are using a database in earnest and it is fully
  1616. covered in the manual you get when you register.
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.                                      - 26 -
  1638. 
  1639.